/**
 * Project  : Looker
 * Package  : net.freestu.looker.monitor
 * File     : AbstractMonitor.java
 * Author   : solosky < solosky772@qq.com >
 * Date     : Aug 27, 2009
 * Modified : Aug 27, 2009
 * License  : Apache License 2.0 
 */
package net.freestu.looker.monitor;

import net.freestu.looker.common.Category;

/**
 * 监视器和更新器的基类  
 */
public abstract class AbstractMonitor implements Runnable
{
	/**
	 * 监视的栏目
	 */
	protected Category category;
	
	
	/**
	 * 构造函数，参数为栏目对象
	 */
	public AbstractMonitor(Category category)
	{
		this.category = category;
	}
	
	/**
	 * 开始监视
	 */
	public abstract void start();
	
	/**
	 * 完成后的回调函数
	 */
	public abstract void finish();
	
	/**
	 * 实现runnable接口
	 */
	public void run()
	{
		this.start();
	}
}
